<ul class="btn">
	<li><a href="javascript:void(0);" class="add">Add</a></li>
</ul>

<table class="records">
	<caption>
		<span>Title</span>
	</caption>
	<thead>
		<tr>
			<th width="30"><input type="checkbox" name="select" value="0"/></th>
			<th width="150"><a href="javascript:void(0);" data-field="0">name</a></th>
			<th>permissions</th>
			<th width="50">action</th>
		</tr>
	</thead>
	<tfoot><tr><td colspan="4"></td></tr></tfoot>
	<tbody><tr><td colspan="4"></td></tr></tbody>
</table>

<script type="text/x-tmpl" class="list-tmpl">
	<% for(var i=0,l=records.length;i<l;i++) { %>
		<% var permissions = records[i]['permissions']; %>
		<tr>
			<td><input type="checkbox" name="id[]" value="<%=records[i]['id']%>"/></td>
			<td title="<%=records[i]['name']%>"><%=records[i]['name']%></td>
			<td><%=permissions==null?'None':permissions.substr(0, 150)%>...</td>
			<td><a href="javascript:void(0);" class="btn edit">Edit</a>
		</tr>
	<% } %>
</script>

<script type="text/x-tmpl" class="form-tmpl">
	<form action="php/index.php?controller=form&action=set" method="post">
		<input type="hidden" name="id"/>
		<div class="row"><label>name</label><input type="text" name="name"/></div>
		<div class="row button"><input type="submit" name="submit" value="提交"/></div>
	</form>
</script>